package Main;

import Controller.BookController;
import Model.Book;
import View.BookView;

import java.util.Scanner;

public class MVCTest {
    public static void main(String[] args) {
        String title;
        String author;
        int genre;
        Book book = new Book();
        BookView bookView = new BookView();
        Scanner scanner = new Scanner(System.in);
        BookController bookController = new BookController(book, bookView);

        System.out.print("请输入书名: ");
        title = scanner.nextLine();

        System.out.print("请输入作者: ");
        author = scanner.nextLine();

        System.out.print("请输入库存: ");
        genre = scanner.nextInt();

        bookController.setBookTitle(title);
        bookController.setBookAuthor(author);
        bookController.setStock(genre);
        bookController.updateView();
    }
}
